package com.kuangstudy.controller;

import com.kuangstudy.service.redis.RedisCreatorIdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author renyitong
 * @version 1.0.0
 * @createTime 2023年09月14日
 * @Description
 */
@RestController
@Api(tags = "Redis生成自增id")
public class RedisCreatorIdController {

    @Autowired
    private RedisCreatorIdService idService;

    @PostMapping("/redis/create/ids")
    @ApiOperation("生成id")
    public Long redisCreateIds(){
        Long aLong = idService.incrmentid("ids:create:product");
        return aLong;
    }


}
